package com.ankang.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.springframework.stereotype.Component;

import java.util.Date;

import java.io.Serializable;

/**
 * @author mjiajia
 * @date 2025/8/27 14:24
 * @desciption
 */
@Data
@TableName("channel_level")
@ApiModel(value = "ChannelLevel对象", description = "通道信息表")
public class ChannelLevel implements Serializable {


    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    /**
     * 所属通道：1通道、2通道、3通道、4通道、5通道
     */
    private Integer channelId;

    /**
     * IO控制器IP
     */
    private String ioIp;

    /**
     * IO控制器端口
     */
    private Integer ioPort;

    /**
     * IO设备地址（参考智嵌手册，默认1-255）
     */
    private Integer ioDeviceAddr;

    /**
     * 读卡器IP
     */
    private String rfidIp;

    /**
     * 读卡器端口（如9090）
     */
    private Integer rfidPort;

    /**
     * 显示器IP
     */
    private String displayIp;

    /**
     * 显示器端口（如5003）
     */
    private Integer displayPort;

    /**
     * 本通道目标烟叶等级（如A1、B2）
     */
    private String targetGrade;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    private Integer readCount;       // 读卡询查次数
    private Integer readInterval;    // 读卡间隔(ms)

    private Integer targetGradeName;

    public Integer getChannelId() {
        return channelId;
    }

    public void setChannelId(Integer channelId) {
        this.channelId = channelId;
    }

    public String getIoIp() {
        return ioIp;
    }

    public void setIoIp(String ioIp) {
        this.ioIp = ioIp;
    }

    public Integer getIoPort() {
        return ioPort;
    }

    public void setIoPort(Integer ioPort) {
        this.ioPort = ioPort;
    }

    public Integer getIoDeviceAddr() {
        return ioDeviceAddr;
    }

    public void setIoDeviceAddr(Integer ioDeviceAddr) {
        this.ioDeviceAddr = ioDeviceAddr;
    }

    public String getRfidIp() {
        return rfidIp;
    }

    public void setRfidIp(String rfidIp) {
        this.rfidIp = rfidIp;
    }

    public Integer getRfidPort() {
        return rfidPort;
    }

    public void setRfidPort(Integer rfidPort) {
        this.rfidPort = rfidPort;
    }

    public String getDisplayIp() {
        return displayIp;
    }

    public void setDisplayIp(String displayIp) {
        this.displayIp = displayIp;
    }

    public Integer getDisplayPort() {
        return displayPort;
    }

    public void setDisplayPort(Integer displayPort) {
        this.displayPort = displayPort;
    }

    public String getTargetGrade() {
        return targetGrade;
    }

    public void setTargetGrade(String targetGrade) {
        this.targetGrade = targetGrade;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public ChannelLevel() {}

}
